﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Treinamento2015_01Core.Models;
using Treinamento2015_01Core.Repository;

namespace Treinamento2015_01Core.Service
{
    public class ManufacturerService : BaseService<Manufacturer, ManufacturerRepository>
    {
        public ManufacturerService()
            : base(new ManufacturerRepository())
        { }

        public void SetAsInactive(Manufacturer manufacturer)
        {
            manufacturer.IsActive = false;
            _Repository.Update(manufacturer);
        }

        public List<Manufacturer> FindAllActives()
        {
            return _Repository.FindAllActives();
        }
    }
}
